import Vue from 'vue'
import Router from 'vue-router'
// 导入登陆
import login from '@/components/login'
// 导入主页
import home from '@/components/tabber/home'

// 导入tabber数据查看组件
import dataview from '@/components/tabber/dataView'
  // 导入总数据与警报 下面的每个日，周，年
  import TotalData from '@/components/dataview/TotalData'
    import everyday from '@/components/dataview/ToalSon/everyday'
    import everyweek from '@/components/dataview/ToalSon/everyweek'
    import everymonth from '@/components/dataview/ToalSon/everymonth'
  // 导入 详细数据 以及下面的 数据和图表
  import detailedData from '@/components/dataview/detailedData'
    import datasj from '@/components/dataview/detailedSon/Datasj'
    import chart from '@/components/dataview/detailedSon/chart'
  // 导入站点信息
  import siteInformation from '@/components/dataview/siteInformation'
// ----------------------


// 导入报警警报
import waring from '@/components/waring/waring'
// 导入维保信息
import maintenance from '@/components/tabber/maintenance'

import wb1 from "@/components/wbinfo/wb1"
import wb2 from "@/components/wbinfo/wb2"
import wb3 from "@/components/wbinfo/wb3"
import wb4 from "@/components/wbinfo/wb4"

// 导入新增维保信息
import addwb from '@/components/addwb/addwb'
// 导入温度组件
import wd from '@/components/tabber/wd'
// 导入客服
import kf from '@/components/tabber/kf'




Vue.use(Router)

export default new Router({
  routes: [
    {path:'/',redirect:'/home'},
    {
      path: '/home',
      name: 'home',
      component: home
    },
    {//警报
      path:'/waring',
      name:'waring',
      component:waring
    },
    
    {//维保信息
      path:'/maintenance',
      children:[
        {path:'/maintenance',redirect:'/maintenance/wb1'},
        {
          path:'wb1',
          name:'wb1',
          component:wb1
        },
        {
          path:'wb2',
          name:'wb2',
          component:wb2
        },
        {
          path:'wb3',
          name:'wb3',
          component:wb3
        },
        {
          path:'wb4',
          name:'wb4',
          component:wb4
        }
      ],
      name:'maintenance',
      component:maintenance
    },
    {//新增维保信息
      path:'/maintenance/addwb',
      name:'addwb',
      component:addwb
    },
    {
      //登陆
      path:'/login',
      name:'login',
      component:login
    },
    {//底部分类：温度
      path:'/wd',
      name:'wd',
      component:wd
    },
    {//底部分类：温度
      path:'/kf',
      name:'kf',
      component:kf
    },
    {//底部----数据查看
      path:'/dataview',      
      children:[
        //默认展示总数据与警报
        {path:'/dataview',redirect:'/dataview/TotalData'},
        {//总数据与警报
          path:'TotalData',
          children:[
            {path:'/dataview/TotalData',redirect:'/dataview/TotalData/everyday'},
            {path:'everyday',name:'everyday',component:everyday},
            {path:'everyweek',name:'everyweek',component:everyweek},
            {path:'everymonth',name:'everymonth',component:everymonth}
          ],
          name:'TotalData',
          component:TotalData
        },
        {//详细数据
          path:'detailedData',
          children:[
            {path:'/dataview/detailedData',redirect:'/dataview/detailedData/datasj'},
            {path:'datasj',name:'datasj',component:datasj},
            {path:'chart',name:'chart',component:chart}
          ],
          name:'detailedData',
          component:detailedData
        },
        {//站点信息
          path:'siteInformation',
          name:'siteInformation',
          component:siteInformation
        }
      ],
      name:'dataview',
      component:dataview
    }
    
  ]
})
